home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / graphics / amicad / arexx_english / simulation.amicad < prev    next >
Text File  |  1999-12-06  |  1KB  |  44 lines

  1. /* Lancement simulation analogique */
  2. /* 8/5/99: version 1.01: ajout guillemets autour du nom du fichier (pour espaces éventuels) */
  3. /* $VER: 1.01e (© R.Florac, 22 mai 1999) */
  4.  
  5. options results     /* indispensable pour récupérer le résultat des macros */
  6.  
  7. signal on error     /* pour l'interception des erreurs */
  8. signal on syntax
  9.  
  10. parse arg fichier
  11. if fichier="" then do
  12.     'REQFILE("Choose a netlist", "Spice", "*.cir")'
  13.     fichier=result
  14. end
  15. if fichier~="" then do
  16.     fichier_simulation='"RAM:'||ParseFileName(fichier)||'_spice"'
  17.     address command
  18.     'stack' " 64000"
  19.     'cd' " Work:spice3f5"
  20.     arguments='"'||fichier||'"'||' -b -r '||fichier_simulation||' >CON:100/100/500/300/Spice/CLOSE/WAIT/SCREENAmiCAD'
  21.     address command
  22.     'Work:spice3f5/bin/spice3f5full_040' arguments
  23. end
  24.  
  25. exit
  26.  
  27. ParseFileName: procedure
  28.     parse arg FilePath, Part
  29.     DivPos = max(lastpos(':',FilePath),lastpos('/',FilePath))+1
  30.     if abbrev('FILE', upper(Part))
  31.     then return substr(FilePath, DivPos)
  32.     else
  33.     return strip(left(FilePath, DivPos-1),'T','/')
  34.  
  35. /* Traitement des erreurs, interruption du programme */
  36. syntax:
  37. erreur=RC
  38. 'MESSAGE("Erreur de syntaxe"+CHR(10)+"en ligne 'SIGL'"+CHR(10)+"'errortext(erreur)'")'
  39. exit
  40.  
  41. error:
  42. 'MESSAGE("Erreur en ligne 'SIGL'")'
  43. exit
  44.